#ifndef _MYCAROBJECT_H_
#define _MYCAROBJECT_H_

#include "mygameobject.h"

/********************************
* Car Object which extends from
* our base game object.
********************************/
class CMyCarObject : public CMyGameObject
{
	public:
		//-----------CONSTRUCTORS----------------------------------------
		CMyCarObject(): CMyGameObject(),_velocity(0),_acceleration(0){};
		~CMyCarObject(){};

		//-----------METHOD OVERRIDES------------------------------------
		virtual bool initialise(LJMUUtilShaderTexPlain* pshader, ID3D10Device* pdevice,
			std::wstring ptexfilename, int pspritewidth, int pspriteheight);
		virtual bool update(float ptpf);
		virtual bool render(float ptpf,D3DXMATRIX pview, D3DXMATRIX portho);
		virtual bool cleanup();

		//-----------GETTERS AND SETTERS---------------------------------
		float getVelocity();
		float getAcceleration();
		void  setVelocity(float pvelocity);
		void  setAcceleration(float pacceleration);

		//-----------PUBLIC METHODS--------------------------------------
		void  addVelocity(float pvelocity);
		void  addAcceleration(float pacceleration);
				

	protected:
		//----------ADDITIONAL CLASS MEMBERS-----------------------------
		float _velocity;
		float _acceleration;
};

//----------------INLINE GETTERS AND SETTERS--------------------------------------------------------

/***********************************
* Get the Velocity of the Car.
***********************************/
inline float CMyCarObject::getVelocity()
{
	return this->_velocity;
}

/***********************************
* Get the Acceleration of the Car.
***********************************/
inline float CMyCarObject::getAcceleration()
{
	return this->_acceleration;
}

/***********************************
* Set the Velocity of the Car
***********************************/
inline void  CMyCarObject::setVelocity(float pvelocity)
{
	this->_velocity = pvelocity;
}

/***********************************
* Set the Acceleration of the Car.
***********************************/
inline void  CMyCarObject::setAcceleration(float pacceleration)
{
	this->_acceleration = pacceleration;
}

#endif

